#设置Cmake最低版本要求
cmake_minimum_required(VERSION 3.28)

#设置项目名称
project(demo)

#设置C++标准
set(CMAKE_CXX_STANDARD 17)

#指定编译器查找头文件的目录
#include_directories(./)

#add_executable(api.cpp)


# 遍历项目根目录下所有的 .cpp 文件
file (GLOB_RECURSE files *.cpp)
foreach (file ${files})
    string(REGEX REPLACE ".+/(.+)\\..*" "\\1" exe ${file})
    add_executable (${exe} ${file}
            maf.cpp
            com/extern/extern_test.c
            #            com/su/api.cpp
    )
    message (" -- src/${exe}.cpp will be compiled to bin/${exe}")
endforeach ()